import { createBrowserRouter } from "react-router-dom"
import LayoutItem from "@/pages/Layout"
import Home from "@/pages/Home"
import Dataset from "@/pages/Dataset"
import DataDetail from "@/pages/Dataset/DataDetail"
import Algor from "@/pages/Algor"
import Process from "@/pages/Process"
import ShowResult from "@/pages/Process/components/ShowResult"
import Show from "@/pages/Show"
import Compare from "@/pages/Compare"
import Refer from "@/pages/Refer"
import ReferItem from "@/pages/Refer/components/ReferItem"
import Solution from "@/pages/Solution"


const router = createBrowserRouter([
  {
    path: '/',
    element: <LayoutItem />,
    children: [
      {
        index: true,
        element: <Home />
      },
      {
        path: '/dataset',
        element: <Dataset />,
      },
      {
        path: '/dataset/:data',
        element: <DataDetail />
      },
      {
        path: '/algor',
        element: <Algor />
      },
      {
        path: '/process',
        element: <Process />
      },
      {
        path: '/process/:result',
        element: <ShowResult />
      },
      {
        path: '/show',
        element: <Show />
      },
      {
        path: '/compare',
        element: <Compare />
      },
      {
        path: '/solution',
        element: <Solution />
      },
      {
        path: '/refer',
        element: <Refer />
      },
      {
        path: '/refer/:data',
        element: <ReferItem />
      },
    ]
  }
])

export default router